Ext.require('EM.model.Folder');

Ext.define('EM.store.Folders', {
    extend:'Ext.data.TreeStore',
    model:'EM.model.Folder',
    storeId:'Folders',
    nodeParam:'id',
    clearOnLoad:false,

    proxy:{
        type:'rest',
        url:'data/folder',
        reader:{
            type:'json',
            root:'data',
            successProperty:'success'
        },
        writer:{
            type:'json',
            root:'data',
            successProperty:'success'
        },
        sorters:[
            {
                property:'text',
                direction:'ASC'
            }
        ]
    }
});